﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MyDiary.Master" Inherits="System.Web.Mvc.ViewPage<Data.SiteUserModels.SiteUserRegistrationModel>" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm("UserRegistration", "Account"))
       {%>
    <%= Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Fields</legend>
        <div class="editor-label">
            <%= Html.LabelFor(model => model.username) %>
        </div>
        <div class="editor-field">
            <%= Html.TextBoxFor(model => model.username) %>
            <%= Html.ValidationMessageFor(model => model.username) %>
        </div>
        <div class="editor-label">
            <%= Html.LabelFor(model => model.password) %>
        </div>
        <div class="editor-field">
            <%= Html.PasswordFor(model => model.password) %>
            <%= Html.ValidationMessageFor(model => model.password) %>
        </div>
        <div class="editor-label">
            <%= Html.LabelFor(model => model.retype_password) %>
        </div>
        <div class="editor-field">
            <%= Html.PasswordFor(model => model.retype_password)%>
            <%= Html.ValidationMessageFor(model => model.retype_password) %>
        </div>
        <div class="editor-label">
            <%= Html.LabelFor(model => model.firstname) %>
        </div>
        <div class="editor-field">
            <%= Html.TextBoxFor(model => model.firstname) %>
            <%= Html.ValidationMessageFor(model => model.firstname) %>
        </div>
        <div class="editor-label">
            <%= Html.LabelFor(model => model.surname) %>
        </div>
        <div class="editor-field">
            <%= Html.TextBoxFor(model => model.surname) %>
            <%= Html.ValidationMessageFor(model => model.surname) %>
        </div>
        <div class="editor-label">
            <%= Html.LabelFor(model => model.email) %>
        </div>
        <div class="editor-field">
            <%= Html.TextBoxFor(model => model.email) %>
            <%= Html.ValidationMessageFor(model => model.email) %>
        </div>
        <div class="editor-label">
            <%= Html.LabelFor(model => model.retype_email) %>
        </div>
        <div class="editor-field">
            <%= Html.TextBoxFor(model => model.retype_email) %>
            <%= Html.ValidationMessageFor(model => model.retype_email) %>
        </div>
        <div class="editor-label">
            <%= Html.LabelFor(model => model.timezone_id) %>
        </div>
        <div class="editor-field">
            <%= Html.DropDownList("timezone_id", (IEnumerable<SelectListItem>) ViewData["timezones"])%>
            <%= Html.ValidationMessageFor(model => model.timezone_id) %>
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%= Html.ActionLink("Cancel Registration", "Index", "Home") %>
    </div>
</asp:Content>
